package com.smfx.yxt.view;

import com.smfx.yxt.common.Const;
import com.smfx.yxt.utils.StringUtil;
import com.smfx.yxt.wechat.utils.WechatGlobalMap;

public class PointTotalView {

	//总积分
	private int totalPoint;
	//当前学期积分
	private int termPoint;
	//当月积分
	private int monthPoint;
	//当月
	private String monthDate;
	//学期id
	private int termId;
	//学期名称
	private String termName;
	//用户名称
	private String userName;
	//年级
	private Integer grade;
	//班级
	private Integer clazz;
	
	private String gradeText;
	
	public int getTotalPoint() {
		return totalPoint;
	}

	public void setTotalPoint(int totalPoint) {
		this.totalPoint = totalPoint;
	}

	public int getTermPoint() {
		return termPoint;
	}

	public void setTermPoint(int termPoint) {
		this.termPoint = termPoint;
	}

	public int getMonthPoint() {
		return monthPoint;
	}

	public void setMonthPoint(int monthPoint) {
		this.monthPoint = monthPoint;
	}

	public String getMonthDate() {
		return monthDate;
	}

	public void setMonthDate(String monthDate) {
		this.monthDate = StringUtil.nullToEmpty(monthDate);
	}

	public int getTermId() {
		return termId;
	}

	public void setTermId(int termId) {
		this.termId = termId;
	}

	public String getTermName() {
		return termName;
	}

	public void setTermName(String termName) {
		this.termName = StringUtil.nullToEmpty(termName);
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = StringUtil.nullToEmpty(userName);
	}

	public Integer getGrade() {
		return grade;
	}

	public void setGrade(Integer grade) {
		this.grade = grade;
	}

	public Integer getClazz() {
		return clazz;
	}

	public void setClazz(Integer clazz) {
		this.clazz = clazz;
	}
	
	public void setGradeText(String gradeText) {
		this.gradeText = gradeText;
	}

	public String getGradeText(){
		TermView view = (TermView) WechatGlobalMap.get(Const.CACHE_TERM).getValue();
		gradeText = view.getGradeName(this.getGrade());
		return StringUtil.nullToEmpty(gradeText);
	}
}
